/**
 * @(#)com.basic.collection.CollectionTest
 *
 * Copyright (c) 2014-2018 上海纬视瑞科技有限公司
 *
 * DESC:
 *
 */
package com.basic.collection;

import java.util.*;

/**
 * @author fusf
 * @version 1.0  2017/3/14
 */
public class CollectionTest {

    public static void main(String[] args) {
        //Collection
        //List
        //Set
        //Map
        List<String> list = new ArrayList<String>();
        list.add("wabc");
        list.add("cde");
        list.add("kkvv");


        List<String> vectorList = new Vector<String>();
        vectorList.add("123");
        vectorList.add("123");
        vectorList.add("456");


        //搜索，排序，线程安全化
        Collections.sort(list);//升序
        Collections.reverse(list);//反序
        for(String s : list) {
            System.out.println(s);
        }
        for(String s : vectorList) {
            System.out.println(s);
        }

    }




}
